package file.files;

import java.io.File;

public class DeleteFileDemo2 {
    public static void main(String[] args) {

        for(int i=1;i<=100;i++){
            File file=new File("./hhh/test"+i+".txt");
            if(file.exists()){
                file.delete();
                System.out.println("第"+i+"个文件删除成功");
            }

        }
    }
}
